import threading
import time


def print_numbers():
    # while true:
    for i in range(1, 6):
        time.sleep(1)
        print(i)


thread1 = threading.Thread(target=print_numbers)
thread2 = threading.Thread(target=print_numbers)

# 启动函数
thread1.start()
thread2.start()
# 等待线程完成
thread1.join()
thread2.join()
print("线程执行完成")